OBJ = kernel
OBJ_NAME = bkern.bin
CC = gcc -I . -Wall -fno-stack-protector

all: kernel

kernel: boot.o entry.o video_root.o libc.o printk.o gdt.o
	ld -Ttext 0x100000 --entry=_start $^ -o $(OBJ_NAME)

boot.o: boot.asm
	nasm -f elf -o $@ $^

.o: .c
	$(CC) -c $^
	
clean:
	rm -f $(OBJ_NAME) *.o

